package by.admonko.universaltesting.datamodel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class AnswerResult {
	/*
	 * id serial NOT NULL, question_result_id integer NOT NULL, answer_id
	 * integer NOT NULL, ans_chek boolean NOT NULL, ans_hand_text character
	 * varying(2000),
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ManyToOne(fetch = FetchType.LAZY, targetEntity = QuestionResult.class)
	private QuestionResult questionResult; // FK

	@Column
	private Integer answerId;// FK

	@Column
	private Boolean ansChek;

	@Column
	private String ansHandText;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getAnswerId() {
		return answerId;
	}

	public void setAnswerId(Integer answerId) {
		this.answerId = answerId;
	}

	public Boolean getAnsChek() {
		return ansChek;
	}

	public void setAnsChek(Boolean ansChek) {
		this.ansChek = ansChek;
	}

	public String getAnsHandText() {
		return ansHandText;
	}

	public void setAnsHandText(String ansHandText) {
		this.ansHandText = ansHandText;
	}
}
